import AppDispatcher from '../dispatcher/dispatcher';

export const Actions = {
    create(data){
        AppDispatcher.dispatch({
            actionType: "FILM_CREATE",
            data: data
        })
    },
    update(id,data){
        AppDispatcher.dispatch({
            actionType: 'FILM_UPDATE',
            data: data,
            id: id
        })
    },
    getList(){
        AppDispatcher.dispatch({
            actionType: 'GET_LIST'
        })
    },
    getFilm(id){
        AppDispatcher.dispatch({
            actionType: 'GET_FILM',
            id: id
        })
    },
    getCats(){
        AppDispatcher.dispatch({
            actionType: 'GET_CATS'
        })
    },
    updateFilter(filter,data){
        AppDispatcher.dispatch({
            actionType: 'FILTER_UPDATE',
            data: data,
            filter: filter
        })
    },
    ctrlNav(data){
        AppDispatcher.dispatch({
            actionType: 'CTRL_NAV',
            data: data
        })
    }
};
